<?php


namespace Tbf\Bundle\YntAuthBundle\Model;
use Tbf\Bundle\CallbackSerializerBundle\CallbackInterface;

/**
 * 表示前台某个第三方用户事务,表示一个第三方用户
 * 保存在session里面,不是api,同一个本站用户session可能包含很多第三方用户
 * 客户端代码仅传递 transaction_id 就可以了
 */
class Transaction {
    /**
     * @var string
     */
    protected $id;
    /**
     * @var CallbackInterface
     */
    protected $login_callback;
    /**
     * @var Media
     */
    protected $media;
    /**
     * @var array
     */
    protected $extra_data;
    /**
     * @var string
     */
    protected $mediaUserId;
    /**
     * 这个是denglu的token
     * @var string
     */
    protected $access_token;
    /**
     * @var string
     */
    protected $refresh_token;
    function __construct($id){
        $this->id = $id;
    }

    /**
     * @param array $extra_data
     */
    public function setExtraData($extra_data)
    {
        $this->extra_data = $extra_data;
    }

    /**
     * @return array
     */
    public function getExtraData()
    {
        return $this->extra_data;
    }

    /**
     * @param string $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param \Tbf\Bundle\CallbackSerializerBundle\CallbackInterface $login_callback
     */
    public function setLoginCallback($login_callback)
    {
        $this->login_callback = $login_callback;
    }

    /**
     * @return \Tbf\Bundle\CallbackSerializerBundle\CallbackInterface
     */
    public function getLoginCallback()
    {
        return $this->login_callback;
    }

    /**
     * @param \Tbf\Bundle\YntAuthBundle\Model\Media $media
     */
    public function setMedia($media)
    {
        $this->media = $media;
    }

    /**
     * @return \Tbf\Bundle\YntAuthBundle\Model\Media
     */
    public function getMedia()
    {
        return $this->media;
    }

    /**
     * @param string $mediaUserId
     */
    public function setMediaUserId($mediaUserId)
    {
        $this->mediaUserId = $mediaUserId;
    }

    /**
     * @return string
     */
    public function getMediaUserId()
    {
        return $this->mediaUserId;
    }

    /**
     * @param string $access_token
     */
    public function setAccessToken($access_token)
    {
        $this->access_token = $access_token;
    }

    /**
     * @return string
     */
    public function getAccessToken()
    {
        return $this->access_token;
    }

    /**
     * @param string $refresh_token
     */
    public function setRefreshToken($refresh_token)
    {
        $this->refresh_token = $refresh_token;
    }

    /**
     * @return string
     */
    public function getRefreshToken()
    {
        return $this->refresh_token;
    }


}